from resources import api, docs,app
from flask_restful import Resource
from flask import jsonify, Response
from flask_apispec import doc, MethodResource

class Demo(MethodResource, Resource):

    @doc(description="demo api", tags=['测试API接口'])
    
    def get(self):
        data = {
            "name":"tom"
        }
        return jsonify(data)

api.add_resource(Demo, "/demo")
docs.register(Demo)




